<template>
  <header class="header">
    <div class="header-container">
              <!-- Logo区域 -->
        <div class="logo-section">
          <router-link to="/" class="logo-link">
            <img src="@/assets/logo.png" alt="智盾清源Logo" class="logo-image">
            <span class="logo-text">智盾清源</span>
          </router-link>
          <!-- <span class="logo-subtitle">多模态AI技术滥用治理和网络谣言净化卫士</span> -->
        </div>

      <!-- 导航菜单 -->
      <nav class="nav-menu">
        <router-link to="/" class="nav-item" exact>首页</router-link>
        <router-link to="/rumor-query" class="nav-item">谣言检测</router-link>
        <router-link to="/knowledge" class="nav-item">知识中心</router-link>
        <router-link to="/about" class="nav-item">关于我们</router-link>
      </nav>

      <!-- 用户操作区域 -->
      <div class="user-actions">
        <router-link to="/login" class="btn btn-outline">登录</router-link>
        <router-link to="/register" class="btn btn-primary">注册</router-link>
      </div>
    </div>
  </header>
</template>

<script>
export default {
  name: 'Header',
  data() {
    return {
      // 可以添加响应式数据
    }
  }
}
</script>

<style scoped>
.header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: white;
  gap: 10px;
}

.logo-image {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.logo-text {
  font-size: 24px;
  font-weight: bold;
  color: white;
}

.logo-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-left: 10px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-item {
  color: white;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-item:hover {
  color: #ffd700;
  transform: translateY(-2px);
}

.nav-item.router-link-exact-active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #ffd700;
}

.nav-item.router-link-exact-active {
  color: #ffd700;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn {
  padding: 8px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-outline:hover {
  background: white;
  color: #1e3c72;
}

.btn-primary {
  background: #ff6b35;
  color: white;
}

.btn-primary:hover {
  background: #ff5722;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
  }
  
  .nav-menu {
    display: none;
  }
  
  .logo-subtitle {
    display: none;
  }
  
  .user-actions {
    gap: 10px;
  }
  
  .btn {
    padding: 6px 15px;
    font-size: 12px;
  }
}
</style> 